#include<stdio.h>
#include<stdlib.h>

int main()
{
	FILE *fp;
	int y;
	int m;
	int d;
	
	if( (fp = fopen("D:\myfiles\date.txt", "w")) == NULL)
	{
		printf("ERROR");
		exit(0);
	}
	
	scanf("%d/%d/%d", &m, &d, &y);
	putw(d, fp);
	putw(m, fp);
	putw(y, fp);
	fclose(fp);
	
	if( (fp = fopen("D:\myfiles\date.txt","r")) == NULL)
	{
		printf("ERROR");
		exit(0);
	}
	
	printf("%d.%d.%d", getw(fp), getw(fp), getw(fp));
	fclose(fp);
	return 0;	
} 

